const seq = require('sequelize')
const time = require('../time')

module.exports = {
  NAME: 'chat_group_user_relation',
  TABLE: {
    group_id: {
      type: seq.INTEGER(11),
      comment: 'group_id 主键，自增',
      field: 'group_id' //  相应的字段名称
    },
    user_id: {
      type: seq.INTEGER(11),
      comment: '用户id',
      field: 'user_id',
      required: true,
    },
    user_alias: {
      type: seq.TEXT,
      comment: '群内别名',
      field: 'user_alias', //  相应的字段名称
    },
    top: {
      type: seq.TINYINT,
      comment: '未置顶(0) 置顶(1) ',
      field: 'top',
      defaultValue: 0
    },
    ...time.create_date,
    ...time.delete_date
  },
}
